package com.gongqi.base.mapper;



import com.gongqi.base.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;

import java.io.Serializable;
import java.util.List;

@Mapper
public interface BaseMapper<T>{
    T loadById(Serializable id);
    List<T> loadAll();

    void remove(Serializable id);
    void save(T t);
    void update(T t);

    //分页   查询总数 + 查询当前页数据--->service中封装为PageList返回
    long loadCount(BaseQuery query);
    List<T> loadData(BaseQuery query);
}
